package jiekou.homework;

/**
 * 士兵
 */
public class Soldier extends Role implements Defend,Attack,SelfIntroduce{
    private Attack attack;
    private Defend defend;

    public Soldier() {
    }

    public Soldier(String name, int level) {
        super(name, level);
    }

    @Override
    public void defend() {

        System.out.println(this.getName() + "说：我可以进行防御（抵抗攻击）");
    }


    @Override
    public void attack() {
        System.out.println(this.getName() + "说：我可以进行攻击");
    }

    @Override
    public void selfintroduce() {
        System.out.println("你好我是'" + this.getName() + "'，我是一名士兵，等级" + this.getLevel());
    }
}
